﻿using System.ComponentModel;
using System.Windows;
using Microsoft.Practices.Unity;

namespace GermaneShanidze.Applications.Jokeri.ViewModels
{
    public class ViewModelBase : INotifyPropertyChanged
    {
        public bool IsDesignTime 
        { 
            get 
            { 
                return (Application.Current == null) || (Application.Current.GetType() == typeof(Application)); 
            } 
        }
        
        #region Interface Implementation
        public event PropertyChangedEventHandler PropertyChanged;
        protected void OnPropertyChanged(string propertyName)
        {
            if (PropertyChanged != null)
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
        }
        #endregion Interface Implementation
    }
}
